<template>
    <div>
        <el-card>
            <div class="publicTitle">基础信息</div>
            <div class="tableWrap">
                <el-table
                    border
                    :show-header="false"
                    :data="tableData"
                    style="width: 30%;height:356px">
                    <el-table-column
                        prop="name">
                    </el-table-column>
                    <el-table-column
                        prop="value">
                        <template slot-scope="scope">
                            <img v-if="scope.$index == 0" class="publicTouxiang" referrerPolicy="no-referrer" :src="scope.row.value">
                            <span v-else>{{scope.row.value}}</span>
                        </template>
                    </el-table-column>
                </el-table>
            </div>
            <el-button type="primary" class="fanhuiBtn" @click="toPubliclist">返回</el-button>
        </el-card>
    </div>
</template>

<script>
export default {
    data() {
        return {
            tableData:[]
        }
    },
    methods:{
        toPubliclist(){
            this.$router.push('/Public/Publiclist')
        }
    },
    created () {
        var appId = this.$route.query.appId;
        this.$http.post('getPublicdetails',{appId}).then((data)=>{
            if(data.data.success){
                this.tableData = data.data.data.tableData;
				var num = data.data.msg.length;
				if ( num>1 ) this.$message({
					showClose: true,
					message: data.data.msg,
					type: 'success',
					offset:'65',
					duration:1000
				});
            }else{
                this.$message.error(data.data.msg)
            }
        })
    }
}
</script>

<style scoped>
.el-card{
    margin: 8px;
}
.publicTitle{
    height: 20px;
    line-height: 20px;
    text-indent: 8px;
    border-left: 6px solid #1890ff;
    margin: 40px 0 8px;
}
.tableWrap{
    display: flex;
    justify-content: space-between;
    padding: 20px;
}
.el-table{
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    font-size: 14px;
    color: #606266;
    flex: none;
}
.publicTouxiang{
    width: 36px;
    height: 36px;
    border-radius: 50%;
}
.fanhuiBtn{
    background-color: #1890ff;
    color: #fff;
    width: 117px;
    margin: 40px 0 0;
}
</style>